package com.xueyi.system.instrumentRecords.domain.po;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import com.xueyi.system.instrumentRecords.domain.dto.BaseInstrumentRecordsDto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.xueyi.common.core.annotation.Excel;

import java.time.LocalDateTime;

/**
 * 消防检查 持久化对象
 *
 * @author yanhe
 */
@TableName(value = "base_instrument_records", excludeProperty = {"sort", "status"},autoResultMap = true)
public class BaseInstrumentRecordsPo extends TBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 设备id
     */
    @Excel(name = "设备id")
    @TableField("device_id")
    private Long deviceId;

    /**
     * 名称
     */
    @Excel(name = "名称")
    @TableField("code")
    private String code;

    /**
     * 送检单位
     */
    @Excel(name = "送检单位")
    @TableField("sgs")
    private String sgs;

    /**
     * 鉴定依据
     */
    @Excel(name = "鉴定依据")
    @TableField("appraisal_basis")
    private String appraisalBasis;

    /**
     * 检定结论
     */
    @Excel(name = "检定结论")
    @TableField("conclusion")
    private String conclusion;

    /**
     * 检定日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "检定日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("verification_date")
    private LocalDateTime verificationDate;

    /**
     * 有效期至
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "有效期至", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("validity_period")
    private LocalDateTime validityPeriod;

    /**
     * 附件
     */

    @TableField(value = "appendix", typeHandler = FastjsonTypeHandler.class)
    private JSONArray appendix;

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public JSONArray getAppendix() {
        return appendix;
    }

    public void setAppendix(JSONArray appendix) {
        this.appendix = appendix;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setSgs(String sgs) {
        this.sgs = sgs;
    }

    public String getSgs() {
        return sgs;
    }

    public void setAppraisalBasis(String appraisalBasis) {
        this.appraisalBasis = appraisalBasis;
    }

    public String getAppraisalBasis() {
        return appraisalBasis;
    }

    public void setConclusion(String conclusion) {
        this.conclusion = conclusion;
    }

    public String getConclusion() {
        return conclusion;
    }

    public void setVerificationDate(LocalDateTime verificationDate) {
        this.verificationDate = verificationDate;
    }

    public LocalDateTime getVerificationDate() {
        return verificationDate;
    }

    public LocalDateTime getValidityPeriod() {
        return validityPeriod;
    }

    public void setValidityPeriod(LocalDateTime validityPeriod) {
        this.validityPeriod = validityPeriod;
    }
}
